import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Reader;
import java.util.Properties;

import org.apache.i18n.translater.PowerTranslater;
import org.apache.i18n.translater.Translater;
import org.apache.i18n.translater.TranslaterFactory;




public class TranslateTomcat {
	public static void main(String[] args) {

		
	    try {
			doPropertiesFile(new File("testData/LocalStrings.properties"),
					new File("testData/LocalStrings_zh.properties"),Apache.ASL);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

	private static void doPropertiesFile(File file, File file2,String comments) {
		Translater createTranslater = TranslaterFactory.createTranslater(Translater.GOOGLE);

		PowerTranslater translater=new PowerTranslater(createTranslater);
		translater.doPropertiesFile(file, file2, comments);
	}
	

}
